<?php

	/**
	 * castField type 'wysiwyg' will transform a textarea (or other input)
	 * into a tinyMCE wysiwyg editor.
	 * 
	 * 06/01/2011 - class creation
	 * 
	 * @author bsuter
	 * @package devmod
	 */
	class Devmod_method_castField_wysiwyg extends Devmod_castField_abstraction {
		
		public function type_add()
		{
			$this->view->assign('field_name', $this->cfg['field_name']);
			return $this->view->fetch('common/cast_wysiwyg.tpl');
		}
		
		public function type_edit()
		{
			$this->view->assign(array(
				'field_name' => $this->cfg['field_name'],
				'value' => $this->value
			));
			return $this->view->fetch('common/cast_wysiwyg.tpl');
		}
		
	}